﻿@model ShoppingCartModel.OrderReviewDataModel
@using Nop.Web.Models.ShoppingCart;
@if (Model.Display)
{
    <div class="order-review-data">
        <div class="title">
            <strong>Order summary review</strong>
        </div>
        <div class="review-data-box">
            <div class="billing-info">
                <div class="title">
                    <strong>@T("Order.BillingAddress")</strong>
                </div>
                <div class="review-box-container">
                    <div class="name">
                        @Model.BillingAddress.FirstName @Model.BillingAddress.LastName
                    </div>
                    <div class="email">
                        @T("Order.Email"): @Model.BillingAddress.Email
                    </div>
                    @if (Model.BillingAddress.PhoneEnabled)
                    {
                        <div class="phone">
                            @T("Order.Phone"): @Model.BillingAddress.PhoneNumber
                        </div>
                    }
                    @if (Model.BillingAddress.FaxEnabled)
                    {
                        <div class="fax">
                            @T("Order.Fax"): @Model.BillingAddress.FaxNumber
                        </div>
                    }
                    @if (Model.BillingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.BillingAddress.Company))
                    {
                        <div class="company">
                            @Model.BillingAddress.Company
                        </div>
                    }
                    @if (Model.BillingAddress.StreetAddressEnabled)
                    {
                        <div class="address1">
                            @Model.BillingAddress.Address1
                        </div>
                    }
                    @if (Model.BillingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.BillingAddress.Address2))
                    {
                        <div class="address2">
                            @Model.BillingAddress.Address2
                        </div>
                    }
                    @if (Model.BillingAddress.CityEnabled ||
                Model.BillingAddress.StateProvinceEnabled ||
                Model.BillingAddress.ZipPostalCodeEnabled)
                    {
                        <div class="city-state-zip">
                            @if (Model.BillingAddress.CityEnabled)
                            {
                                @Model.BillingAddress.City
                            }
                            @if (Model.BillingAddress.CityEnabled && (Model.BillingAddress.StateProvinceEnabled || Model.BillingAddress.ZipPostalCodeEnabled))
                            {
                                <text>,</text>
                            }
                            @if (Model.BillingAddress.StateProvinceEnabled)
                            {
                                @Model.BillingAddress.StateProvinceName
                            }
                            @if (Model.BillingAddress.ZipPostalCodeEnabled)
                            {
                                @Model.BillingAddress.ZipPostalCode
                            }
                        </div>
                    }
                    @if (Model.BillingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.BillingAddress.CountryName))
                    {
                        <div class="country">
                            @Model.BillingAddress.CountryName
                        </div>
                    }
                    @if (!String.IsNullOrEmpty(Model.BillingAddress.FormattedCustomAddressAttributes))
                    {
                        <div class="custom-attributes-view">
                            @Html.Raw(Model.BillingAddress.FormattedCustomAddressAttributes)
                        </div>
                    }
                    @if (!String.IsNullOrEmpty(Model.PaymentMethod))
                    {
                        <div class="title">
                            <strong>@T("Order.Payment")</strong>
                        </div>
                        <div class="payment-method">
                            <span class="label">
                                @T("Order.Payment.Method"):
                            </span>
                            <span class="value">
                                @Model.PaymentMethod
                            </span>
                        </div>
                    }
                </div>
            </div>
            @if (Model.IsShippable)
            {
                <div class="shipping-info">
                    @if (!Model.SelectedPickUpInStore)
                    {
                        <div class="title">
                            <strong>
                                @T("Order.ShippingAddress")
                            </strong>
                        </div>
                        <div class="review-box-container">
                            <div class="name">
                                @Model.ShippingAddress.FirstName @Model.ShippingAddress.LastName
                            </div>
                            <div class="email">
                                @T("Order.Email"): @Model.ShippingAddress.Email
                            </div>
                            @if (Model.ShippingAddress.PhoneEnabled)
                            {
                                <div class="phone">
                                    @T("Order.Phone"): @Model.ShippingAddress.PhoneNumber
                                </div>
                            }
                            @if (Model.ShippingAddress.FaxEnabled)
                            {
                                <div class="fax">
                                    @T("Order.Fax"): @Model.ShippingAddress.FaxNumber
                                </div>
                            }
                            @if (Model.ShippingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.Company))
                            {
                                <div class="company">
                                    @Model.ShippingAddress.Company
                                </div>
                            }
                            @if (Model.ShippingAddress.StreetAddressEnabled)
                            {
                                <div class="address1">
                                    @Model.ShippingAddress.Address1
                                </div>
                            }
                            @if (Model.ShippingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.ShippingAddress.Address2))
                            {
                                <div class="address2">
                                    @Model.ShippingAddress.Address2
                                </div>
                            }
                            @if (Model.ShippingAddress.CityEnabled ||
                        Model.ShippingAddress.StateProvinceEnabled ||
                        Model.ShippingAddress.ZipPostalCodeEnabled)
                            {
                                <div class="city-state-zip">
                                    @if (Model.ShippingAddress.CityEnabled)
                                    {
                                        @Model.ShippingAddress.City
                                    }
                                    @if (Model.ShippingAddress.CityEnabled && (Model.ShippingAddress.StateProvinceEnabled || Model.ShippingAddress.ZipPostalCodeEnabled))
                                    {
                                        <text>,</text>
                                    }
                                    @if (Model.ShippingAddress.StateProvinceEnabled)
                                    {
                                        @Model.ShippingAddress.StateProvinceName
                                    }
                                    @if (Model.ShippingAddress.ZipPostalCodeEnabled)
                                    {
                                        @Model.ShippingAddress.ZipPostalCode
                                    }
                                </div>
                            }
                            @if (Model.ShippingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.CountryName))
                            {
                                <div class="country">
                                    @Model.ShippingAddress.CountryName
                                </div>
                            }
                            @if (!String.IsNullOrEmpty(Model.ShippingAddress.FormattedCustomAddressAttributes))
                            {
                                <div class="custom-attributes-view">
                                    @Html.Raw(Model.ShippingAddress.FormattedCustomAddressAttributes)
                                </div>
                            }
                            <div class="title">
                                <strong>@T("Order.Shipping")</strong>
                            </div>
                            <div class="shipping-method">
                                <span class="label">
                                    @T("Order.Shipping.Name"):
                                </span>
                                <span class="value">
                                    @Model.ShippingMethod
                                </span>
                            </div>
                        </div>

                    }
                </div>
            }
        </div>
    </div>
}